export function getLocalData(key: string) {
  try {
    return JSON.parse(localStorage.getItem(key) as string)
  } catch (error) {
    console.log(`--------key:${key}------`, error)
  }
}

export function setLocalData(key: string, data: unknown) {
  try {
    localStorage.setItem(key, JSON.stringify(data))
  } catch (error) {
    console.log(`--------key:${key}------`, error)
  }
}
